/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package asja.outras;
import java.awt.Component;
import java.awt.LayoutManager;
import javax.swing.*;

/**
 *
 * @author Alice Bimbi Ngunga 7262451
 * Filipe Gabriel
 * Adailto
 * ***************************************
 * CLASSE RESPONSÁVEL PARA LIMPEZA DE TODOS OS CAMPOS DE TEXTO (JTextField) CONTIDOS EM UM PAINEL
 * 
 * 
 */
public class LimpaTela extends JPanel{

    public LimpaTela() {
    }
        
    public void LimpaTela(JPanel painel) {       
            //limpa os campos       
            for (int i=0; i < painel.getComponentCount(); i++) {     
                //varre todos os componentes       
                Component c = painel.getComponent(i);       
                if (c instanceof JTextField) {                             
                    JTextField field = (JTextField) c;     
                    field.setText("");                        
                    }     
                }     
            }   
 
}
